Optimal. Leaf size=93 \[ -\frac {\log (1-\sin (c+d x))}{2 (a+b) d}+\frac {\log (\sin (c+d x))}{a d}-\frac {\log (1+\sin (c+d x))}{2 (a-b) d}+\frac {b^2 \log (a+b \sin (c+d x))}{a \left (a^2-b^2\right ) d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2916, 12, 908}
\begin {gather*} \frac {b^2 \log (a+b \sin (c+d x))}{a d \left (a^2-b^2\right )}-\frac {\log (1-\sin (c+d x))}{2 d (a+b)}-\frac {\log (\sin (c+d x)+1)}{2 d (a-b)}+\frac {\log (\sin (c+d x))}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 908
Rule 2916
Rubi steps
\begin {align*} \int \frac {\csc (c+d x) \sec (c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {b \text {Subst}\left (\int \frac {b}{x (a+x) \left (b^2-x^2\right )} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b^2 \text {Subst}\left (\int \frac {1}{x (a+x) \left (b^2-x^2\right )} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b^2 \text {Subst}\left (\int \left (\frac {1}{2 b^2 (a+b) (b-x)}+\frac {1}{a b^2 x}+\frac {1}{a (a-b) (a+b) (a+x)}-\frac {1}{2 (a-b) b^2 (b+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {\log (1-\sin (c+d x))}{2 (a+b) d}+\frac {\log (\sin (c+d x))}{a d}-\frac {\log (1+\sin (c+d x))}{2 (a-b) d}+\frac {b^2 \log (a+b \sin (c+d x))}{a \left (a^2-b^2\right ) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 84, normalized size = 0.90 \begin {gather*} -\frac {\frac {\log (1-\sin (c+d x))}{a+b}-\frac {2 \log (\sin (c+d x))}{a}+\frac {\log (1+\sin (c+d x))}{a-b}-\frac {2 b^2 \log (a+b \sin (c+d x))}{a \left (a^2-b^2\right )}}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.26, size = 87, normalized size = 0.94
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (\sin \left (d x +c \right )\right )}{a}+\frac {b^{2} \ln \left (a +b \sin \left (d x +c \right )\right )}{a \left (a +b \right ) \left (a -b \right )}-\frac {\ln \left (1+\sin \left (d x +c \right )\right )}{2 a -2 b}-\frac {\ln \left (\sin \left (d x +c \right )-1\right )}{2 a +2 b}}{d}\) | \(87\) |
default | \(\frac {\frac {\ln \left (\sin \left (d x +c \right )\right )}{a}+\frac {b^{2} \ln \left (a +b \sin \left (d x +c \right )\right )}{a \left (a +b \right ) \left (a -b \right )}-\frac {\ln \left (1+\sin \left (d x +c \right )\right )}{2 a -2 b}-\frac {\ln \left (\sin \left (d x +c \right )-1\right )}{2 a +2 b}}{d}\) | \(87\) |
norman | \(\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}+\frac {b^{2} \ln \left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{a d \left (a^{2}-b^{2}\right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d \left (a -b \right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{\left (a +b \right ) d}\) | \(114\) |
risch | \(\frac {i x}{a +b}+\frac {i c}{d \left (a +b \right )}+\frac {i x}{a -b}+\frac {i c}{d \left (a -b \right )}-\frac {2 i b^{2} x}{a \left (a^{2}-b^{2}\right )}-\frac {2 i b^{2} c}{a d \left (a^{2}-b^{2}\right )}-\frac {2 i x}{a}-\frac {2 i c}{a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d \left (a +b \right )}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d \left (a -b \right )}+\frac {b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{a d \left (a^{2}-b^{2}\right )}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a d}\) | \(226\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 80, normalized size = 0.86 \begin {gather*} \frac {\frac {2 \, b^{2} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{3} - a b^{2}} - \frac {\log \left (\sin \left (d x + c\right ) + 1\right )}{a - b} - \frac {\log \left (\sin \left (d x + c\right ) - 1\right )}{a + b} + \frac {2 \, \log \left (\sin \left (d x + c\right )\right )}{a}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 93, normalized size = 1.00 \begin {gather*} \frac {2 \, b^{2} \log \left (b \sin \left (d x + c\right ) + a\right ) + 2 \, {\left (a^{2} - b^{2}\right )} \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right ) - {\left (a^{2} + a b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (a^{2} - a b\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, {\left (a^{3} - a b^{2}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\csc {\left (c + d x \right )} \sec {\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 86, normalized size = 0.92 \begin {gather*} \frac {\frac {2 \, b^{3} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{3} b - a b^{3}} - \frac {\log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a - b} - \frac {\log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a + b} + \frac {2 \, \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.17, size = 87, normalized size = 0.94 \begin {gather*} \frac {\ln \left (\sin \left (c+d\,x\right )\right )}{a\,d}-\frac {\ln \left (\sin \left (c+d\,x\right )+1\right )}{2\,d\,\left (a-b\right )}-\frac {\ln \left (\sin \left (c+d\,x\right )-1\right )}{2\,d\,\left (a+b\right )}+\frac {b^2\,\ln \left (a+b\,\sin \left (c+d\,x\right )\right )}{a\,d\,\left (a^2-b^2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________